<template>
  <div>
    <MaterialRequisitionFormView :id.sync="editId" />
  </div>
</template>
<script>

import MaterialRequisitionFormView from "@/ModuleMaterial/views/Material/MaterialRequisitionForm/MaterialRequisitionFormView.vue";
import {
  MaterialRequisitionFormVerifyPass,
  MaterialRequisitionFormVerifyReject,
} from "@/ModuleMaterial/api/Material/MaterialRequisitionForm";
export default {
  name: "AuditMaterialRequisitionFormDialog",
  components: {
    MaterialRequisitionFormView,
    // MaterialRequisitionFormView,
  },
  props: {
    editId: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      loading: true,
    };
  },
  watch: {},
  created() {},
  methods: {
    innerPass(obj) {
      // ModuleMaterial.Api["Material"]
      //   .MaterialRequisitionFormVerifyPass(obj)
      //   .then((res) => {
      //     this.$emit("passOrNoPassEmit");
      //   })
      //   .catch();
     MaterialRequisitionFormVerifyPass(obj).then((res) => {
        this.$emit("passOrNoPassEmit");
      });
    },
    innerReject(obj) {
 MaterialRequisitionFormVerifyReject(obj).then((res) => {
        this.$emit("passOrNoPassEmit");
      });
    },
    innerWithdraw(obj) {
      obj.auditStatus = 60;
      ModuleMaterial.Api["Material/MaterialRequisitionForm"].MaterialRequisitionFormVerifyReject(obj).then((res) => {
        this.$emit("passOrNoPassEmit");
      });
      // DeviceManage.Api["DeviceMaintenance"]
      //   .verifyReject(obj)
      //   .then((res) => {
      //     this.$emit("passOrNoPassEmit");
      //   })
      //   .catch();
    },
  },
};
</script>
<style scoped>
</style>
